//
//  LSZMakePhoneCallTableViewCell.m
//  PartyClassCloud
//
//  Created by 梁素珍 on 2018/10/17.
//  Copyright © 2018年 九酷. All rights reserved.
//

#import "LSZMakePhoneCallTableViewCell.h"

@implementation LSZMakePhoneCallTableViewCell

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.imageViewHeaderPortrait = [[UIImageView alloc]initWithFrame:CGRectMake(10, 10, 60, 60)];
        [self.imageViewHeaderPortrait.layer setMasksToBounds:YES];
        [self.imageViewHeaderPortrait.layer setCornerRadius:self.imageViewHeaderPortrait.frame.size.height/2];
        [self addSubview:self.imageViewHeaderPortrait];
        
        self.labelName = [[UILabel alloc]initWithFrame:CGRectMake(10+CGRectGetMaxX(self.imageViewHeaderPortrait.frame), 15,80, 25)];
        self.labelName.textColor = titleColorLSZ;
        self.labelName.font = FONT_(14);
        [self addSubview:self.labelName];
 
        self.labelType = [[UILabel alloc]init];
        self.labelType.frame = CGRectMake(CGRectGetMaxX(self.labelName.frame), CGRectGetMinY(self.labelName.frame), ScreenWidth-CGRectGetMaxX(self.labelName.frame)-65, self.labelName.frame.size.height);
        self.labelType.font = FONT_(13);
        self.labelType.textColor = [UIColor whiteColor];
        [self addSubview:self.labelType];
        
        self.labelPhone = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMinX(self.labelName.frame), CGRectGetMaxY(self.labelType.frame)+5, ScreenWidth-CGRectGetMinX(self.labelName.frame), 25)];
        self.labelPhone.textColor = lightColor;
        self.labelPhone.font = FONT_(13);
        [self addSubview:self.labelPhone];
        
        self.butPhone = [[UIButton alloc]initWithFrame:CGRectMake(ScreenWidth-65, 0, 65, 80)];
        [self addSubview:self.butPhone];
        
        self.imageViewPhone = [[UIImageView alloc]init];
        self.imageViewPhone.frame = CGRectMake(ScreenWidth-20-25, (80-25)/2, 25, 25);
        self.imageViewPhone.image = [UIImage imageNamed:@"红电话"];
        [self addSubview:self.imageViewPhone];
    }
    return self;
}
-(void)setAddressBookMg:(LSZAddressBookMg *)addressBookMg
{
    //头像默认
    [self.imageViewHeaderPortrait sd_setImageWithURL:[NSURL URLWithString:@""] placeholderImage:[UIImage imageNamed:@"头像默认"]];
    self.labelName.text = [NSString stringWithFormat:@"%@",addressBookMg.name];
    self.labelPhone.text = [NSString stringWithFormat:@"手机号:%@",addressBookMg.contactPhone];
    self.labelType.text = @"帮扶责任人";
}

@end
